gtk: Fix event delivery on GTK_PHASE_TARGET controllers
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 15 May 2017 11:44:33 +0000 (13:44 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 25 May 2017 14:25:59 +0000 (16:25 +0200)
Look up the event target, not the "event widget" which is based on the
event window, and thus points to the toplevel.

gtk/gtkwidget.c

index bdffa04ad97de2967827c0bc0c2c39b2d83fe056..70212da9c04e00d403b7cc0d5d4132a90eb181d2 100644 (file)
@@ -6961,7 +6961,7 @@ gtk_widget_event_internal (GtkWidget      *widget,
   event_copy = gdk_event_copy (event);
   translate_coordinates (event_copy, widget);
 
-  if (widget == gtk_get_event_widget (event_copy))
+  if (widget == gtk_get_event_target (event_copy))
     return_val |= _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_TARGET);
 
   g_signal_emit (widget, widget_signals[EVENT], 0, event_copy, &handled);